<%--
    Document   : removegroupcustomer
    Created on : Jul 25, 2012, 1:43:49 PM
    Author     : ems
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
    </head>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){


            //validateform("form-input-customer");
        });

    </script>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
            $j('.keysearch').live('keyup',function(){
                $j('.rich-table-row').hide();
                $j('.rich-table-row').each(function(){
                    html = $j(this).html();
                    if( html.indexOf( $j('.keysearch').val()) > -1 )  {
                        $j(this).show();
                    }else{
                        $j(this).hide();
                    }

                });
            });
             $j(".checkgroup").live("change",function(){  
                    
                    if($j(this).is(':checked')){ 
                      pn100 = $j(this).attr("lang");         
                        showPleaseWait();
                        $j.post("actioncheckGroupEmployee.jsp?action=unCheckGroup&pn100="+pn100,function(data){
                            if(data!= null){
                                $j(".mesage").text("CẬP NHẬT THÀNH CÔNG !");
                                  hidePleaseWait();
                            }
                        });
                    
                    }
    
                });

        });
    </script>
    <style type="text/css">
        .rich-inplace-view{
            background:none;
            border-bottom: none ;
        }
        .fields_input{
            float:left;
            width:200px;
            margin-top:5px;
        }
        .fields_input label{
            font-weight: bold;
            width:100%;
            float:left;
        }
        .fields_input input{
            padding:2px;
            width:160px;
            float:left;
        }
        .searchbox{
            float:left;
            width:600px;
            height:80px;
            margin-left: 100px;
        }
        .sort_char a{
            border-right: 1px solid #82A6C7;
            color: #82A6C7;
            display: inline-block;
            line-height: 10px;
            padding: 0 5px;
            cursor:pointer !important;
            text-decoration: none;
            font-size:10px;

        }
        .rich-table-subheadercell{
            background:  none repeat scroll 0 0 #4884B5;
        }
        .rich-table-subheadercell div {
            color: white !important;
            font-weight: bold;
        }
        .sort_char{ text-align: center;margin:8px 0px 9px 6px}
        .sort_char label{ cursor:pointer !important;}
        .buttonsearch2{
            background: url("../images/btn_search.png") no-repeat scroll 7px 4px transparent;
            border: 0 none;
            color: #FFFFFF;
            cursor: pointer;
            height: 24px;
            margin-top: 4px;
            text-transform: uppercase;
            width: 31px;
        }
        .greyRow{
            background: #E0EFFC;
        }
        .mesage{
            font-size: 14px;
        }
    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;overflow: hidden;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>

                <div class="popup" style="height:412px; width:960px; margin-top:13px; margin-right: 12px ">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="Xóa ra khỏi nhóm"/></div>
                        <div style=" position: fixed; float:left; height:50px;width:50px;left:908px;">
                            <a id="fancybox-close" onclick="self.parent.location='<h:outputText value="#{k400Controller.pageload}"/>?action=reloadGroup&pk400=<h:outputText value="#{k400Controller.PK400}"/>'"  style="display: block; float:left;"></a>
                        </div>
                    </div>
                    <div class="popup-content" style="background:white;">
                        <div class="main_content">
                            <div class="search_char" style="float:left;width:500px;height: 30px;padding: 8px 0px 0px 10px;">
                                <h:inputText value="#{k400Controller.keysearch}" onfocus="if(this.value=='#{k400Controller.keysearch}')this.value='';" styleClass="keysearch"  style="width:393px"/>
                                <h:commandButton      action="#{k400Controller.reload}" value="" style="margin-left:5px;" styleClass="buttonsearch2">
                                </h:commandButton>
                            </div>
                            <div class="list_customer" style="width:950px; height:255px; overflow-y:auto; overflow-x: hidden">
                                <rich:dataTable value="#{k400Controller.lstK100Re}" var="cus"
                                                rows="20"
                                                rowClasses="greyRow, whiteRow"
                                                style=" margin-left:10px;"

                                                width="926px" columnClasses=",columns,columns,columns" rowKeyVar="row"
                                                id="table" styleClass="machinePosDataTable">

                                    <rich:column style="width:40px; text-align:center">
                                        <f:facet name="header">
                                            <h:outputText value="#{locale.select}" />
                                        </f:facet>
                                        <h:selectBooleanCheckbox value="#{cus.selected}" styleClass="checkgroup" lang="#{cus.pk100}&pk400=#{k400Controller.PK400}&kv451=#{k400Controller.kv451}" />
                                    </rich:column>
                                    <rich:column style="width:220px;">
                                        <f:facet name="header">
                                            <h:outputText value="Tên công ty" />
                                        </f:facet>
                                        <div style="width:220px;">
                                            <h:outputText value="#{cus.kv103}" />
                                        </div>
                                    </rich:column>
                                    <rich:column  width="160px">
                                        <f:facet name="header">
                                            <h:outputText value="#{locale.email}" />
                                        </f:facet>

                                        <div style="width:160px;">
                                            <h:outputText value="" />
                                        </div>
                                    </rich:column>
                                    <rich:column  width="80px">
                                        <f:facet name="header">
                                            <h:outputText value="#{locale.telephone}" />
                                        </f:facet>

                                        <div style="width:80px;">
                                            <h:outputText value="" />
                                        </div>
                                    </rich:column>



                                    <rich:column  style="width:auto">
                                        <f:facet name="header">
                                            <h:outputText value="#{locale.address}" />
                                        </f:facet>
                                        <div style="width:auto">
                                            <h:outputText value="" />
                                        </div>

                                    </rich:column>

                                </rich:dataTable>
                            </div>

                        </div>

                    </div>

                    <div class="popup-footer">
                        <label style="color:red; margin-left: 320px; color: red;float: left;margin-left: 320px;margin-top: 17px;"><div class="mesage"><h:outputText id="message" value="#{k400Controller.message}"/></div> </label>
                        <h:inputHidden value="#{k400Controller.PK400}" id="PK400"/>
                        <h:inputHidden value="#{k400Controller.pageload}" id="pageload"/>
                        <h:inputHidden value="#{k400Controller.kv451}" id="kv451"/>
                        <div class="buttonsave" onclick="self.parent.location='<h:outputText value="#{k400Controller.pageload}"/>?action=reloadGroup&pk400=<h:outputText value="#{k400Controller.PK400}"/>&type=<h:outputText value="#{k400Controller.type}"/>&dayss=<h:outputText value="#{k400Controller.days}"/>'"  ><span><h:outputText value="#{locale.close}"/></span></div>
                     <%--   <h:commandButton onclick="showPleaseWait();"    action="#{k400Controller.deleteSelected}" value="#{locale.save}" styleClass="buttonsave">
                            <a4j:support event="click" reRender="message"/>
                        </h:commandButton> --%>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>

                    </div>

                </div>
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
</script>

